import utils  from '@utils/index'

export const list = function(data) {
    return utils.service({
        url: '/m/order/list',
        method: 'post',
        data
    })
}

export const cancelOrder = function(data) {
    return utils.service({
        url: '/m/order/cancel/'+data.id,
        method: 'get'
    })
}

export const payOrder = function(data) {
    return utils.service({
        url: '/m/order/pay/'+data.id,
        method: 'get'
    });
    // 唤起JSSDK 支付流程
}


export const orderDetail = function(data) {
    return utils.service({
        url: '/m/order/get/'+data.id,
        method: 'get'
    })
}

export const logisticsDetail = function(code) {
    return utils.service({
        url: '/m/logistics/get/'+code,
        method: 'get'
    })
}